﻿@using ALinq.BBS.App_GlobalResources
@using ALinq.BBS
@using ALinq.BBS.DataAccess
@using ALinq.BBS.Models
@model ALinq.BBS.DataAccess.User
@{
    PageData["Title"] = Label.MySpace;
    PageData["Css"] = "User.css";
    Layout = "_LayoutBase.cshtml";

    ALinq.BBS.DataAccess.User user = Model;
    var postList = (PostList)ViewData["PostList"];

    Func<int, string> createUrl = delegate(int pageIndex)
    {
        var userName = user.Name;
        var result = this.CreateUserPageUrl(userName, pageIndex);
      
        return result.ToString();
    };

    var pagingModel = new PagingModel(postList, createUrl);
}
<table cellpadding="0" cellspacing="0" style="width: 100%">
    <tr>
        <td style="vertical-align: top; padding-right: 10px;">
            <table border="0" cellspacing="0" style="width: 100%">
                <tr>
                    <td colspan="5" class="user_TopBar">
                        <div class="user_TopBack">
                            我的帖子</div>
                    </td>
                </tr>
                <tr style="font-size: 12px; color: #636563">
                    <td align="center">
                        标题
                    </td>
                    <td align="center">
                        回复
                    </td>
                    <td align="center">
                        阅读
                    </td>
                    <td align="center">
                        时间
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        <hr style="color: #dedfde; height: 1px;" />
                    </td>
                </tr>
                @foreach (Post post in postList)
                {
                    <tr align="left">
                        <td class="postListItem" style="text-align: left">
                            @this.CreatePostPageLink(post)
                        </td>
                        <td width="80" class="postListItem">
                            @post.Replies.Count
                        </td>
                        <td width="80" class="postListItem">
                            @post.HitCount
                            <br />
                        </td>
                        <td width="160" class="postListItem">
                            @post.Date.ToString("yyyy-MM-dd hh:mm")
                            <br />
                            <a target="_blank"></a>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" class="dot">
                        </td>
                    </tr>
                }
            </table>
            @RenderPage("../Shared/Controls/PagingBar.cshtml", pagingModel)
        </td>
        <td style="width: 200px; vertical-align: top">
            <div class="user_Panel">
                <img id="imgUser" alt="" src="@user.Photo" runat="server" />
            </div>
            <div>
                <div class="user_Item">
                    用 户 名：@user.Name
                </div>
                <div class="user_Item">
                    注册时间：@user.CreationDate
                </div>
            </div>
            <div class="user_Item">
                <div class="user_Title">
                    社区信息</div>
            </div>
            <div class="user_Item">
                发帖数：@user.PostsCount</div>
            <div class="user_Item">
                积 分：@user.Score
            </div>
            <div class="user_Item">
                <a href="http://forum.taobao.com/manage/gift.htm?new=1">赠送</a>
            </div>
            <div class="user_Item">
                <div class="user_Title">
                    联系方式</div>
            </div>
            <div class="user_Item">
                QQ:@user.QQ
            </div>
            <div class="user_Item">
                ICQ:@user.ICQ
            </div>
            <div class="user_Item">
                MSN:@user.MSN
            </div>
            <div class="user_Item">
                <a href="http://forum.taobao.com/message/add_private_msg.htm?recipient_nickname=%E6%B8%85%E4%B8%80">
                    发送</a>
            </div>
            <div class="user_Item">
                <div class="user_Title">
                    空间人气</div>
            </div>
            <div class="user_Item">
                <b>@user.HitCount </b>
            </div>
            <div class="user_Item" style="height: 100px;">
                &nbsp;</div>
        </td>
    </tr>
</table>
